﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ContactList.ascx.cs" Inherits="BackEnd_ContactList" %>
<script language ="javascript" type="text/javascript">
	function confirmFeedBack(id,name)
		{
			if (confirm("Bạn chắc chắn với quyết định của mình chưa ?"))
			{
			   window.location="<%=_Url%>"+id;
			   
			}
			else 
			{
			    window.location="<%=_Url%>"+0;
			}
		}	</script>
	
<form>
<table id="Table2" cellspacing="1" cellpadding="1" width="100%" border="0">
    <tr>
        <td class="toolbar" width="100%" align="center">
            <b>Danh sách các khách hàng liên hệ tới cơ sở Tuyết Lan
            </b>
        </td>
    </tr>
      <tr>
        <td  width="100%" align ="center">
       
            <asp:DropDownList ID="ddlMonth" runat="server" 
                onselectedindexchanged="GetDataByMonth" AutoPostBack="true">
                <asp:ListItem Value="1">Tháng 1</asp:ListItem>
                <asp:ListItem Value="2">Tháng 2</asp:ListItem>
                <asp:ListItem Value="3">Tháng 3</asp:ListItem>
                <asp:ListItem Value="4">Tháng 4</asp:ListItem>
                <asp:ListItem Value="5">Tháng 5</asp:ListItem>
                <asp:ListItem Value="6">Tháng 6</asp:ListItem>
                <asp:ListItem Value="7">Tháng 7</asp:ListItem>
                <asp:ListItem Value="8">Tháng 8</asp:ListItem>
                <asp:ListItem Value="9">Tháng 9</asp:ListItem>
                <asp:ListItem Value="10">Tháng 10</asp:ListItem>
                <asp:ListItem Value="11">Tháng 11</asp:ListItem>
                <asp:ListItem Value="12">Tháng 12</asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>
     <tr>
        <td  style="width:100%; padding-left:90%">
        <asp:Button ID="btnDelect" runat="server" Text="Delete" onclick="btnDelect_Click"/>
        </td>
         
    </tr>
    <tr>
        <td>
            <asp:Label ID="lbmessage" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td align="left"><%--OnRowDeleting="grid_RowDeleting"  AutoGenerateDeleteButton="True" OnPageIndexChanging="grid_PageIndexChanging" AutoGenerateEditButton="True"  OnRowEditing="grid_RowEditing" OnRowUpdating="grid_RowUpdating"--%>
            <asp:GridView runat="server" ID="grid" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
                RowStyle-BorderWidth="0" RowStyle-BorderStyle="None" Width="100%" AlternatingRowStyle-BackColor="#f8f8f8"
                AlternatingRowStyle-BorderColor="#f8f8f8" HeaderStyle-BackColor="#F1F1F1" CellPadding="4"
                AutoGenerateColumns="False"  AllowSorting="True" BackColor="White" ShowFooter="True" >
                <Columns>
                    <asp:TemplateField HeaderText="<a href='#' onclick='javascript:CheckAll()'>Chọn</a>/<a href='#' onclick='javascript:UnCheckAll()'>Bỏ chọn</a>">
                        <ItemTemplate>
                             <input type="checkbox" name="check<%#Eval(Component.ColumContact._Id)%>" value="<%#Eval(Component.ColumContact._Id)%>"
                                    onclick="check_Click">
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Họ tên">
                        <ItemTemplate>
                            <%#Eval(Component.ColumContact._FullName)%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>                    
                    <asp:TemplateField HeaderText="Địa chỉ">
                        <ItemTemplate>
                            <%#Eval(Component.ColumContact._Address)%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Huyện(quận)/Tỉnh(Thành)">
                        <ItemTemplate>
                            <%#Eval(Component.ColumContact._Ward)%>
                            /
                            <%#Eval(Component.ColumContact._Province)%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Email">
                        <ItemTemplate>
                            <%#Eval(Component.ColumContact._Mail)%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Điện thoại">
                        <ItemTemplate>
                            <%#Eval(Component.ColumContact._Phone)%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Ngày liên hệ">
                        <ItemTemplate>
                            <%#Eval(Component.ColumContact._Date)%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Nội dung">
                        <ItemTemplate>
                            <%#Eval(Component.ColumContact._Content)%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                      <asp:TemplateField HeaderText="Hình thức mua">
                        <ItemTemplate>
                            <%#Eval(Component.ColumContact._Sy)%>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Phản hồi">
                        <ItemTemplate>
                            <input  type="radio" name="<%#Eval(Component.ColumContact._Id)%>" <%#Eval(Component.ColumContact._View)%> onclick="javascript:confirmFeedBack(<%#Eval(Component.ColumContact._Id)%>,<%#Eval(Component.ColumContact._Id)%>)" />
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Giỏi hàng">
                        <ItemTemplate>
                            <input id="Cart" value="Xem giỏi hàng" type="button" onclick='OpenWindowUploadFile("BackEnd/AdminDisplay/DetailCart/DetailCart.aspx?<%=Component.ConstString._idcart%>=<%#Eval(Component.ColumContact._Cart)%>","window","width = 630px, height =520px");' />
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                </Columns>
                <RowStyle BorderStyle="None" BorderWidth="0px" />
                <HeaderStyle BackColor="#F1F1F1" />
                <AlternatingRowStyle BackColor="#F8F8F8" BorderColor="#F8F8F8" />
            </asp:GridView>
        </td>
    </tr>
</table>
</form>
